package nc.ui.wds.xstj;

import java.awt.Container;
import nc.ui.trade.check.BeforeActionCHK;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException;
import nc.vo.trade.checkrule.ICheckRule;
import nc.vo.trade.checkrule.ICheckRules;
import nc.vo.trade.checkrule.ICheckRules2;
import nc.vo.trade.checkrule.ICompareRule;
import nc.vo.trade.checkrule.ISpecialChecker;
import nc.vo.trade.checkrule.IUniqueRule;
import nc.vo.trade.checkrule.IUniqueRules;
import nc.vo.trade.checkrule.VOChecker;

public class XstjUICheckRule extends BeforeActionCHK
  implements ICheckRules, IUniqueRules, ICheckRules2
{
  public IUniqueRule[] getHeadUniqueRules()
  {
    return null;
  }

  public IUniqueRule[] getItemUniqueRules(String tablecode)
  {
    IUniqueRule[] unique = (IUniqueRule[])null;

    return unique;
  }

  public ISpecialChecker getSpecialChecker()
  {
    return null;
  }

  public boolean isAllowEmptyBody(String tablecode)
  {
    return false;
  }

  public ICheckRule[] getHeadCheckRules() {
    return null;
  }

  public ICheckRule[] getItemCheckRules(String tablecode) {
    return null;
  }

  public ICompareRule[] getHeadCompareRules() {
    return null;
  }

  public String[] getHeadIntegerField() {
    return null;
  }

  public String[] getHeadUFDoubleField() {
    return null;
  }

  public ICompareRule[] getItemCompareRules(String tablecode) {
    return null;
  }

  public String[] getItemIntegerField(String tablecode) {
    return null;
  }

  public String[] getItemUFDoubleField(String tablecode) {
    return null;
  }

  public void runBatchClass(Container parent, String billType, String actionName, AggregatedValueObject[] vos, Object[] obj) throws Exception
  {
  }

  public void runClass(Container parent, String billType, String actionName, AggregatedValueObject vo, Object obj) throws Exception {
    if (actionName.equals("WRITE"))
    {
      if (!VOChecker.check(vo, this))
        throw new BusinessException(VOChecker.getErrorMessage());
    }
  }
}